import request from '@/utils/request'

export const getCarPageApi = async (params: any) => {
    return request.get('/car', { params })
}

export const getCarOptionListApi = async () => {
    return request.get('/car/option-list')
}

export const getCarByIdApi = async (id: string) => {
    return request.get(`/car/${id}`)
}

export const createCarApi = async (data: any) => {
    return request.post('/car', data)
}

export const updateCarApi = async (id: any, data: any) => {
    return request.put(`/car/${id}`, data)
}

export const deleteCarApi = async (id: string) => {
    return request.delete(`/car/${id}`)
}
